<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>新生招生</title>
	<script src="__STATIC__/js/jquery-2.1.4.min.js" type="text/javascript"></script>
</head>

<body>
    <h2>新生招生</h2>
	<input type="text" id="zqh"/> <input type="button" value="查询" onclick="query()"/>
	<div id="result" style="display:none">
	</div>
</body>
<script>
	var url = "/zhaosheng/zhao_sheng";
	function query() {
	     var zqh = $("#zqh").val();
		$.ajax({
		   type:"GET",
		   url: url + "/getData",
		   data:{
				zqh: zqh
		   },
		   success: function(resp){
				var html = "<p><b>中签结果：</b></p>";
				//判断是否为空对象
				if(!$.isEmptyObject(resp)) {
					html+="<p>中签号："+resp.中签号+"</p>";
					html+="<p>姓名："+resp.姓名+"</p>";
					html+="<p>上课地点："+resp.上课地点+"</p>";
				}else {
					html+="<p style='color:red'>抱歉！没有查到中签结果</p>";
				}
				$("#result").show();
				$("#result").html(html);
			}
		});
	}
	
</script>

</html>
